/*    */ package com.cr.common.exception.file;
/*    */ 
/*    */ import java.util.Arrays;
/*    */ import org.apache.commons.fileupload.FileUploadException;
/*    */ 
/*    */ public class InvalidExtensionException extends FileUploadException {
/*    */   private static final long serialVersionUID = 1L;
/*    */   
/*    */   private String[] allowedExtension;
/*    */   
/*    */   private String extension;
/*    */   
/*    */   private String filename;
/*    */   
/*    */   public InvalidExtensionException(String[] allowedExtension, String extension, String filename) {
/* 21 */     super("filename : [" + filename + "], extension : [" + extension + "], allowed extension : [" + Arrays.toString((Object[])allowedExtension) + "]");
/* 22 */     this.allowedExtension = allowedExtension;
/* 23 */     this.extension = extension;
/* 24 */     this.filename = filename;
/*    */   }
/*    */   
/*    */   public String[] getAllowedExtension() {
/* 29 */     return this.allowedExtension;
/*    */   }
/*    */   
/*    */   public String getExtension() {
/* 34 */     return this.extension;
/*    */   }
/*    */   
/*    */   public String getFilename() {
/* 39 */     return this.filename;
/*    */   }
/*    */   
/*    */   public static class InvalidImageExtensionException extends InvalidExtensionException {
/*    */     private static final long serialVersionUID = 1L;
/*    */     
/*    */     public InvalidImageExtensionException(String[] allowedExtension, String extension, String filename) {
/* 48 */       super(allowedExtension, extension, filename);
/*    */     }
/*    */   }
/*    */   
/*    */   public static class InvalidFlashExtensionException extends InvalidExtensionException {
/*    */     private static final long serialVersionUID = 1L;
/*    */     
/*    */     public InvalidFlashExtensionException(String[] allowedExtension, String extension, String filename) {
/* 58 */       super(allowedExtension, extension, filename);
/*    */     }
/*    */   }
/*    */   
/*    */   public static class InvalidMediaExtensionException extends InvalidExtensionException {
/*    */     private static final long serialVersionUID = 1L;
/*    */     
/*    */     public InvalidMediaExtensionException(String[] allowedExtension, String extension, String filename) {
/* 68 */       super(allowedExtension, extension, filename);
/*    */     }
/*    */   }
/*    */   
/*    */   public static class InvalidVideoExtensionException extends InvalidExtensionException {
/*    */     private static final long serialVersionUID = 1L;
/*    */     
/*    */     public InvalidVideoExtensionException(String[] allowedExtension, String extension, String filename) {
/* 78 */       super(allowedExtension, extension, filename);
/*    */     }
/*    */   }
/*    */ }


/* Location:              D:\tmp\creditorRights-admin\BOOT-INF\lib\creditorRights-common-4.7.0.jar!\com\cr\common\exception\file\InvalidExtensionException.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */